/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const nestedRouter = {
  path: '/wms',
  component: Layout,
  redirect: '/wms/warehouse_files',
  name: 'wms',
  meta: {
    title: 'wms',
    icon: 'nested'
  },
  children: [
    {
      path: 'warehouse_files',
      component: () => import('@/views/wms/warehouse_files/index'), // Parent router-view
      name: 'warehouse_files',
      meta: {
        title: 'warehouse_files'
      },
      children: [
        {
          path: 'warehouse',
          component: () => import('@/views/wms/warehouse_files/warehouse/warehouseList'),
          name: 'warehouse',
          meta: {
            title: 'warehouse'
          }
        },
        {
          path: 'warehouse_space',
          component: () => import('@/views/wms/warehouse_files/warehouse_space/warehouseSpaceList'),
          name: 'warehouse_space',
          meta: {
            title: 'warehouse_space'
          }
        },
        {
          path: 'warehouse_location',
          component: () => import('@/views/wms/warehouse_files/warehouse_location/WarehouseLocationList'),
          name: 'warehouse_location',
          meta: {
            title: 'warehouse_location'
          }
        },
        {
          path: 'warehouse_airview',
          component: () => import('@/views/wms/warehouse_files/warehouse_graph/WarehouseAirview'),
          name: 'warehouse_airview',
          meta: {
            title: 'warehouse_airview'
          }
        },
        {
          path: 'warehouse_graph',
          component: () => import('@/views/wms/warehouse_files/warehouse_graph/WarehouseGraph'),
          name: 'warehouse_graph',
          meta: {
            title: 'warehouse_graph'
          }
        },
        {
          path: 'warehouseLocation_graph',
          component: () => import('@/views/wms/warehouse_files/warehouse_graph/WarehouseLocationGraph'),
          name: 'warehouseLocation_graph',
          meta: {
            title: 'warehouseLocation_graph'
          }
        },
        {
          path: 'warehouseLocation_view',
          component: () => import('@/views/wms/warehouse_files/warehouse_graph/WarehouseLocationView'),
          name: 'warehouseLocation_view',
          meta: {
            title: 'warehouseLocation_view'
          }
        }
      ]
    }, {
      path: 'inbound',
      component: () => import('@/views/wms/inbound/index'), // Parent router-view
      name: 'inbound',
      meta: {
        title: 'inbound'
      },
      children: [
        {
          path: 'highway',
          component: () => import('@/views/wms/inbound/highway'),
          name: 'highway_inbound',
          meta: {
            title: 'highway_inbound'
          },
          children: [

            {
              path: 'appointment_list',
              component: () => import('@/views/wms/inbound/highway/appointment/list'),
              name: 'highway_appointment_inbound_list',
              meta: {
                title: 'appointment_list'
              }
            },
            {
              path: 'job_list',
              component: () => import('@/views/wms/inbound/highway/job/highwayInboundJobList'),
              name: 'highway_inbound_job_list',
              params: {
                id: 2
              },
              meta: {
                title: 'job_list'
              }
            },
            {
              path: 'labourJob/2',
              component: () => import('@/views/wms/components/list/labourJobList'),
              name: 'highway_labourJob',
              meta: {
                title: 'highway_labourJob'
              }
            },
            {
              path: 'inboundList/1',
              component: () => import('@/views/wms/components/inbound/inboundList'),
              name: 'inbound_highway_list',
              meta: {
                title: 'inbound_highway_list'
              }
            }
          ]
        },
        {
          path: 'railway',
          component: () => import('@/views/wms/inbound/railway'),
          name: 'railway_inbound',
          meta: {
            title: 'railway_inbound'
          },
          children: [
            {
              path: 'appointment_list',
              component: () => import('@/views/wms/inbound/railway/appointment/railwayAppointmentInboundList'),
              name: 'railway_appointment_inbound_list',
              meta: {
                title: 'appointment_list'
              }
            },
            {
              path: 'job_list',
              component: () => import('@/views/wms/inbound/railway/job/railwayInboundJobList'),
              name: 'railway_job_inbound',
              meta: {
                title: 'job_list'
              }
            },
            {
              path: 'labourJob/0',
              component: () => import('@/views/wms/components/list/labourJobList'),
              name: 'railway_labourJob',
              meta: {
                title: 'highway_labourJob'
              }
            },
            {
              path: 'inboundList/0',
              component: () => import('@/views/wms/components/inbound/inboundList'),
              name: 'inbound_railway_list',
              meta: {
                title: 'inbound_highway_list'
              }
            }
          ]
        },
        {
          path: 'port',
          component: () => import('@/views/wms/inbound/port'),
          name: 'port_inbound',
          meta: {
            title: 'port_inbound'
          },
          redirect: '/wms/warehouse_files',
          children: [
            {
              path: 'appointment_list',
              component: () => import('@/views/wms/inbound/port/appointment/portAppointmentInboundList'),
              name: 'port_appointment_inbound_list',
              meta: {
                title: 'appointment_list'
              }
            },
            {
              path: 'job_list',
              component: () => import('@/views/wms/inbound/port/job/portInboundJobList'),
              name: 'port_inbound_job_list',
              meta: {
                title: 'job_list'
              }
            },
            {
              path: 'labourJob/4',
              component: () => import('@/views/wms/components/list/labourJobList'),
              name: 'port_inbound_labourJob',
              meta: {
                title: 'highway_labourJob'
              }
            },
            {
              path: 'inboundList/2',
              component: () => import('@/views/wms/components/inbound/inboundList'),
              name: 'inbound_port_list',
              meta: {
                title: 'inbound_highway_list'
              }
            }
          ]
        }
      ]
    }, {
      path: 'outbound',
      component: () => import('@/views/wms/outbound/index'), // Parent router-view
      name: 'outbound',
      meta: {
        title: 'outbound'
      },
      children: [
        {
          path: 'highway',
          component: () => import('@/views/wms/outbound/highway'),
          name: 'highway_outbound',
          meta: {
            title: 'highway_outbound'
          },
          children: [
            {
              path: 'delivery_order',
              component: () => import('@/views/wms/outbound/highway/highwayDeliveryOrder/highwayDeliveryOrderList'),
              name: 'delivery_order',
              meta: {
                title: 'delivery_order'
              }
            },
            {
              path: 'appointment_list',
              component: () => import('@/views/wms/outbound/highway/appointment/highwayAppointmentOutboundList'),
              name: 'highway_appointment_outbound_list',
              meta: {
                title: 'appointment_list'
              }
            },
            {
              path: 'job_list',
              component: () => import('@/views/wms/outbound/highway/job/highwayOutboundJobList'),
              name: 'highway_outbound_job_list',
              meta: {
                title: 'job_list'
              }
            },
            {
              path: 'labourJob/3',
              component: () => import('@/views/wms/components/list/labourJobList'),
              name: 'highway_outbound_labourJob',
              meta: {
                title: 'highway_labourJob'
              }
            },
            {
              path: 'outboundList/1',
              component: () => import('@/views/wms/components/outbound/outboundList'),
              name: 'outbound_highway_list',
              meta: {
                title: 'outbound_highway_list'
              }
            }
          ]
        },
        {
          path: 'railway',
          component: () => import('@/views/wms/outbound/railway'),
          name: 'railway_outbound',
          meta: {
            title: 'railway_outbound'
          },
          children: [{
            path: 'appointment_list',
            component: () => import('@/views/wms/outbound/railway/appointment/railwayAppointmentOutboundList'),
            name: 'railway_appointment_outbound_list',
            meta: {
              title: 'appointment_list'
            }
          },
          {
            path: 'job_list',
            component: () => import('@/views/wms/outbound/railway/job/railwayOutboundJobList'),
            name: 'railway_job_list',
            meta: {
              title: 'job_list'
            }
          },
          {
            path: 'labourJob/1',
            component: () => import('@/views/wms/components/list/labourJobList'),
            name: 'railway_inbound_labourJob',
            meta: {
              title: 'highway_labourJob'
            }
          },
          {
            path: 'outboundList/0',
            component: () => import('@/views/wms/components/outbound/outboundList'),
            name: 'outbound_railways_list',
            meta: {
              title: 'outbound_highway_list'
            }
          }
          ]
        },
        {
          path: 'port',
          component: () => import('@/views/wms/outbound/port'),
          name: 'port_outbound',
          meta: {
            title: 'port_outbound'
          },
          children: [
            {
              path: 'appointment_list',
              component: () => import('@/views/wms/outbound/port/appointment/portAppointmentOutboundList'),
              name: 'port_appointment_outbound_list',
              meta: {
                title: 'appointment_list'
              }
            },
            {
              path: 'job_list',
              component: () => import('@/views/wms/outbound/port/job/portOutboundJobList'),
              name: 'port_outbound_job_list',
              meta: {
                title: 'job_list'
              }
            },
            {
              path: 'labourJob/5',
              component: () => import('@/views/wms/components/list/labourJobList'),
              name: 'port_outbound_labourJob',
              meta: {
                title: 'highway_labourJob'
              }
            },
            {
              path: 'outboundList/2',
              component: () => import('@/views/wms/components/outbound/outboundList'),
              name: 'outbound_port_list',
              meta: {
                title: 'outbound_highway_list'
              }
            }
          ]
        }
      ]
    }, {
      path: 'transfer',
      component: () => import('@/views/wms/transfer/index'), // Parent router-view
      name: 'transfer',
      meta: {
        title: 'transfer'
      },
      children: [
        // {
        //   path: 'appointment_transfer',
        //   component: () => import('@/views/wms/transfer/appointment/components/appointmentTransferAdd'),
        //   name: 'appointment_transfer',
        //   meta: {
        //     title: 'appointment_transfer'
        //   }
        // },
        {
          path: 'appointment_transfer_list',
          component: () => import('@/views/wms/transfer/appointment/appointmentTransferList'),
          name: 'appointment_transfer_list',
          meta: {
            title: 'appointment_transfer_list'
          }
        },
        // {
        //   path: 'transfer_job',
        //   component: () => import('@/views/wms/transfer/job/components/transferJobAdd'),
        //   name: 'transfer_job',
        //   meta: {
        //     title: 'transfer_job'
        //   }
        // },
        {
          path: 'transfer_job_list',
          component: () => import('@/views/wms/transfer/job/transferJobList'),
          name: 'transfer_job_list',
          meta: {
            title: 'transfer_job_list'
          }
        },

        {
          path: 'labourJob/7',
          component: () => import('@/views/wms/components/list/labourJobList'),
          name: 'labourJob',
          meta: {
            title: 'highway_labourJob'
          }
        }
        // {
        //   path: 'transfer_outbound',
        //   component: () => import('@/views/wms/transfer/list/components/transferAdd'),
        //   name: 'transfer_outbound',
        //   meta: {
        //     title: 'transfer_outbound'
        //   }
        // },
        // {
        //   path: 'transfer_list1',
        //   component: () => import('@/views/wms/transfer/list/transferList'),
        //   name: 'transfer_list1',
        //   meta: {
        //     title: 'transfer_list1'
        //   }
        // }
      ]
    }, {
      path: 'damage',
      component: () => import('@/views/wms/damage'), // Parent router-view
      name: 'damage',
      meta: {
        title: 'damage'
      },
      children: [{
        path: 'damage_list',
        component: () => import('@/views/wms/damage/list/damageList'),
        name: 'damage_list',
        meta: {
          title: 'damage_list'
        }
      },
      {
        path: 'damageinbound_list',
        component: () => import('@/views/wms/damage/damageInbound/damageInboundList'),
        name: 'damageinbound_list',
        meta: {
          title: 'damageinbound_list'
        }
      },
      {
        path: 'reorganize_list',
        component: () => import('@/views/wms/damage/reorganize/damageReorganizeList'),
        name: 'reorganize_list',
        meta: {
          title: 'reorganize_list'
        }
      },
      {
        path: 'damage_difference_statistic',
        component: () => import('@/views/wms/damage/damageDifferenceStatistic'),
        name: 'damage_difference_statistic',
        meta: {
          title: 'damage_difference_statistic'
        }
      },
      {
        path: 'broken_bag',
        component: () => import('@/views/wms/damage/brokenBag/brokenBagList'),
        name: 'broken_bag',
        meta: {
          title: 'broken_bag'
        }
      },
      {
        path: 'damage_arrangement',
        component: () => import('@/views/wms/damage/damageArrangement/damageArrangementList'),
        name: 'damage_arrangement',
        meta: {
          title: 'damage_arrangement'
        }
      },
      {
        path: 'labourJob/8',
        component: () => import('@/views/wms/components/list/labourJobList'),
        name: 'labourJob',
        meta: {
          title: 'highway_labourJob'
        }
      }
      ]
    }, {
      path: 'checks',
      component: () => import('@/views/wms/check/index'), // Parent router-view
      name: 'checks',
      meta: {
        title: 'checks'
      },
      children: [
        {
          path: 'checks_list',
          component: () => import('@/views/wms/check/checks/checksList'),
          name: 'checks_list',
          meta: {
            title: 'checks_list'
          }
        },
        {
          path: 'checks_difference_list',
          component: () => import('@/views/wms/check/checksDifference/checksDifferenceList'),
          name: 'checks_difference_list',
          meta: {
            title: 'checks_difference_list'
          }
        }
      ]
    }, {
      path: 'inventory',
      component: () => import('@/views/wms/inventory'), // Parent router-view
      name: 'inventory',
      meta: {
        title: 'inventory'
      },
      children: [{
        path: 'cargo_right_transfer_list',
        component: () => import('@/views/wms/inventory/cargo_right_transfer/cargoRightTransferList'),
        name: 'cargo_right_transfer_list',
        meta: {
          title: 'cargo_right_transfer_list'
        }
      },
      {
        path: 'current_roll_over_add',
        component: () => import('@/views/wms/inventory/current_roll_over/currentRollOver'),
        name: 'current_roll_over_add',
        meta: {
          title: 'current_roll_over_add'
        }
      },
      {
        path: 'current_roll_over_list',
        component: () => import('@/views/wms/inventory/current_roll_over/currentRollOverList'),
        name: 'current_roll_over_list',
        meta: {
          title: 'current_roll_over_list'
        }
      }
      ]
    }, {
      path: 'labour',
      component: () => import('@/views/wms/labour/index'), // Parent router-view
      name: 'labour',
      meta: {
        title: 'labour'
      },
      children: [{
        path: 'job',
        component: () => import('@/views/wms/labour/job/jobList'),
        name: 'labour_job',
        meta: {
          title: 'job_list'
        }
      },
      // {
      //   path: 'auditor',
      //   component: () => import('@/views/wms/labour/auditor'),
      //   name: 'labour_auditor',
      //   meta: {
      //     title: 'labour_auditor'
      //   }
      // }
      {
        path: 'labourJob/6',
        component: () => import('@/views/wms/components/list/labourJobList'),
        name: 'labourJob',
        meta: {
          title: 'highway_labourJob'
        }
      }
      ]
    }, {
      path: 'settlement',
      component: () => import('@/views/wms/settlement'), // Parent router-view
      name: 'settlement',
      meta: {
        title: 'settlement'
      },
      children: [{
        path: 'warehouse',
        component: () => import('@/views/wms/settlement/warehouse/inventoryList'),
        name: 'warehouse_settlement',
        meta: {
          title: 'warehouse_settlement'
        }
      },
      {
        path: 'warehouse_cost_accountingList',
        component: () => import('@/views/wms/settlement/warehouse/warehouseCostAccountingList'),
        name: 'warehouse_cost_accountingList',
        meta: {
          title: 'warehouse_cost_accountingList'
        }
      },
      {
        path: 'other',
        component: () => import('@/views/wms/settlement/other/otherCostSettlementList'),
        name: 'other_settlement',
        meta: {
          title: 'other_settlement'
        }
      },
      {
        path: 'added',
        component: () => import('@/views/wms/settlement/added/appreciationCostTypeManagementList'),
        name: 'added_settlement',
        meta: {
          title: 'added_settlement'
        }
      },
      {
        path: 'collection',
        component: () => import('@/views/wms/settlement/collection/receiptList'),
        name: 'collection_settlement',
        meta: {
          title: 'collection_settlement'
        }
      },
      {
        path: 'collection_list',
        component: () => import('@/views/wms/settlement/collection/receipt'),
        name: 'collection_settlement_list',
        meta: {
          title: 'collection_settlement_list'
        }
      },
      {
        path: 'collection_writeOff',
        component: () => import('@/views/wms/settlement/collection/writeOff'),
        name: 'collection_writeOff',
        meta: {
          title: 'collection_writeOff'
        }
      }
      ]
    }, {
      path: 'invoice',
      component: () => import('@/views/wms/invoice'), // Parent router-view
      name: 'wms_invoice',
      meta: {
        title: 'wms_invoice'
      },
      children: [{
        path: 'list',
        component: () => import('@/views/wms/invoice/list/invoiceList'),
        name: 'wms_invoice_list',
        meta: {
          title: 'wms_invoice'
        }
      },
      {
        path: 'information',
        component: () => import('@/views/wms/invoice/invoice_information'),
        name: 'wms_invoice_information',
        meta: {
          title: 'wms_invoice_information'
        }
      }
      ]
    }, {
      path: 'comprehensive_query',
      component: () => import('@/views/wms/comprehensive_query'), // Parent router-view
      name: 'wms_comprehensive_query',
      meta: {
        title: 'wms_comprehensive_query'
      },
      children: [{
        path: 'wms_labour_job_list',
        component: () => import('@/views/wms/comprehensive_query/labourJobList'),
        name: 'wms_labour_job_list',
        meta: {
          title: 'wms_labour_job_list'
        }
      },
      {
        path: 'wm_inventory_list',
        component: () => import('@/views/wms/comprehensive_query/inventoryList'),
        name: 'wm_inventory_list',
        meta: {
          title: 'wm_inventory_list'
        }
      },
      {
        path: 'wm_inventory_reality_list',
        component: () => import('@/views/wms/comprehensive_query/inventoryRealityList'),
        name: 'wm_inventory_reality_list',
        meta: {
          title: 'wm_inventory_reality_list'
        }
      },
      {
        path: 'wm_inventory_damage_list',
        component: () => import('@/views/wms/comprehensive_query/inventoryDamageList'),
        name: 'wm_inventory_damage_list',
        meta: {
          title: 'wm_inventory_damage_list'
        }
      },
      {
        path: 'wm_inventory_record_list',
        component: () => import('@/views/wms/comprehensive_query/inventoryRecordList'),
        name: 'wm_inventory_record_list',
        meta: {
          title: 'wm_inventory_record_list'
        }
      },
      {
        path: 'wms_salement_data_list',
        component: () => import('@/views/wms/comprehensive_query/salementDataList'),
        name: 'wms_salement_data_list',
        meta: {
          title: 'wms_salement_data_list'
        }
      },
      {
        path: 'wm_inventory_record_reality_list',
        component: () => import('@/views/wms/comprehensive_query/inventoryRecordRealityList'),
        name: 'wm_inventory_record_reality_list',
        meta: {
          title: 'wm_inventory_record_reality_list'
        }
      },
      {
        path: 'wms_audit_record_list',
        component: () => import('@/views/wms/comprehensive_query/auditRecordList'),
        name: 'wms_audit_record_list',
        meta: {
          title: 'wms_audit_record_list'
        }
      }
      ]
    },
    {
      path: 'contract',
      component: () => import('@/views/manageService/contract'),
      name: 'contract',
      meta: {
        title: 'contract'
      },
      children: [
        {
          path: 'storage',
          component: () => import('@/views/manageService/contract/storage/contractList'),
          name: 'storage',
          meta: {
            title: 'storageContract'
          }
        }, {
          path: 'transport',
          component: () => import('@/views/manageService/contract/transport'),
          name: 'transport',
          meta: {
            title: 'transportContract'
          }
        },
        {
          // 仓储计费类型
          path: 'costType',
          component: () =>
            import('@/views/basicInfo/costType/costTypeList'),
          name: 'costType',
          meta: {
            title: 'costType'
          }
        },
        {
          path: 'chargingType',
          component: () =>
            import('@/views/basicInfo/chargingType/chargingTypeList'),
          name: 'chargingType',
          meta: {
            title: 'chargingType'
          }
        },
        {
          path: 'forceType',
          component: () =>
            import('@/views/basicInfo/forceType/forceTypeList'),
          name: 'forceType',
          meta: {
            title: 'forceType'
          }
        }
      ]
    },
    {
      path: 'fieldQueuing',
      component: () => import('@/views/wms/fieldQueuing'), // Parent router-view
      name: 'wms_fieldQueuing',
      meta: {
        title: 'wms_fieldQueuing'
      }
    },
    {
      path: 'vehicleQueuingConfigure',
      component: () => import('@/views/wms/vehicleQueuingConfigure'), // Parent router-view
      name: 'wms_vehicleQueuingConfigure',
      meta: {
        title: 'wms_vehicleQueuingConfigure'
      }
    }
  ]
}

export default nestedRouter
